#ifndef HISTOMGRAM_H
#define HISTOMGRAM_H

#include <QImage>
#include <QPainter>
#include <QPicture>

class Histomgram
{
public:
    Histomgram();
    Histomgram(int* grayInfo, int threshold, Qt::GlobalColor color);

    QImage getImage();
    void setThreshold1(int threshold);
    void setThreshold2(int threshold);
    void drawThreshold();

private:
    QImage m_source;
    QImage m_image;
    int m_grayInfo[256];
    int m_maxPixels;
    int m_width;
    int m_height;
    int m_threshold1;
    int m_threshold2;

    Qt::GlobalColor m_color;

    void createImage();
};

#endif // HISTOMGRAM_H
